/*
 * XML Type:  FlightType
 * Namespace: http://xscraper.openjawtech.com/schema
 * Java type: com.openjawtech.xscraper.schema.FlightType
 *
 * Automatically generated - do not modify.
 */
package com.openjawtech.xscraper.schema.impl;
/**
 * An XML FlightType(@http://xscraper.openjawtech.com/schema).
 *
 * This is a complex type.
 */
public class FlightTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.openjawtech.xscraper.schema.FlightType
{
    
    public FlightTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName TRAVELDATE$0 = 
        new javax.xml.namespace.QName("", "travelDate");
    private static final javax.xml.namespace.QName PRICE$2 = 
        new javax.xml.namespace.QName("", "price");
    
    
    /**
     * Gets the "travelDate" element
     */
    public java.util.Calendar getTravelDate()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TRAVELDATE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getCalendarValue();
        }
    }
    
    /**
     * Gets (as xml) the "travelDate" element
     */
    public org.apache.xmlbeans.XmlDate xgetTravelDate()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlDate target = null;
            target = (org.apache.xmlbeans.XmlDate)get_store().find_element_user(TRAVELDATE$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "travelDate" element
     */
    public void setTravelDate(java.util.Calendar travelDate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TRAVELDATE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TRAVELDATE$0);
            }
            target.setCalendarValue(travelDate);
        }
    }
    
    /**
     * Sets (as xml) the "travelDate" element
     */
    public void xsetTravelDate(org.apache.xmlbeans.XmlDate travelDate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlDate target = null;
            target = (org.apache.xmlbeans.XmlDate)get_store().find_element_user(TRAVELDATE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlDate)get_store().add_element_user(TRAVELDATE$0);
            }
            target.set(travelDate);
        }
    }
    
    /**
     * Gets the "price" element
     */
    public java.math.BigDecimal getPrice()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PRICE$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getBigDecimalValue();
        }
    }
    
    /**
     * Gets (as xml) the "price" element
     */
    public org.apache.xmlbeans.XmlDecimal xgetPrice()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlDecimal target = null;
            target = (org.apache.xmlbeans.XmlDecimal)get_store().find_element_user(PRICE$2, 0);
            return target;
        }
    }
    
    /**
     * Tests for nil "price" element
     */
    public boolean isNilPrice()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlDecimal target = null;
            target = (org.apache.xmlbeans.XmlDecimal)get_store().find_element_user(PRICE$2, 0);
            if (target == null) return false;
            return target.isNil();
        }
    }
    
    /**
     * True if has "price" element
     */
    public boolean isSetPrice()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PRICE$2) != 0;
        }
    }
    
    /**
     * Sets the "price" element
     */
    public void setPrice(java.math.BigDecimal price)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PRICE$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PRICE$2);
            }
            target.setBigDecimalValue(price);
        }
    }
    
    /**
     * Sets (as xml) the "price" element
     */
    public void xsetPrice(org.apache.xmlbeans.XmlDecimal price)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlDecimal target = null;
            target = (org.apache.xmlbeans.XmlDecimal)get_store().find_element_user(PRICE$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlDecimal)get_store().add_element_user(PRICE$2);
            }
            target.set(price);
        }
    }
    
    /**
     * Nils the "price" element
     */
    public void setNilPrice()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlDecimal target = null;
            target = (org.apache.xmlbeans.XmlDecimal)get_store().find_element_user(PRICE$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlDecimal)get_store().add_element_user(PRICE$2);
            }
            target.setNil();
        }
    }
    
    /**
     * Unsets the "price" element
     */
    public void unsetPrice()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PRICE$2, 0);
        }
    }
}
